package net.neptech.model.schedule;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.neptech.utils.SnowflakeIdGenerator;
import org.hibernate.annotations.GenericGenerator;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
/**
 * @Author HuangZhengmin
 * @desc  排班期望表实体类
 * @Date 2025/8/12 17:17
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "sche_expectation")
public class ScheExpectation implements Serializable {
    @Serial
    private static final Long serialVersionUID = 1L;

  @Id
  @GenericGenerator(name = "snowflake", type = SnowflakeIdGenerator.class)
  @GeneratedValue(generator = "snowflake")
  @Column(name = "expectation_id", nullable = false)
  private Long expectationId; // 期望ID

  @Column(name = "user_id")
  private Long userId; // 提交期望的用户ID

  @Column(name = "start_date")
  private Date startDate; // 开始日期

  @Column(name = "end_date")
  private Date endDate; // 结束日期

  @Column(name = "shift_codes", length = 255)
  private String shiftCodes; // 期望班次(逗号分隔)

  @Column(name = "preferred_days", length = 255)
  private String preferredDays; // 偏好日期(逗号分隔：1-周一，2-周二，...，7-周天)

  @Column(name = "unavailable_days", length = 255)
  private String unavailableDays; // 不可用日期(逗号分隔)

  @Column(name = "status", nullable = false)
  private Integer status = 0; // 状态(0-待处理,1-已处理)

  @Column(name = "complete_time")
  private Date completeTime; // 完成时间

  @Column(name = "comment", length = 255)
  private String comment; // 备注说明

  @Column(name = "create_time")
  private Date createTime; // 创建时间

  @Column(name = "update_time")
  private Date updateTime; // 更新时间
}
